package com.sti.framework.models.User.data;

import com.baomidou.mybatisplus.annotation.TableName;
import com.sti.framework.core.data.AbstractEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * user 用户权限表
 *
 *
 * enty 实物
 *
 * @author AARON
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "user_role_authority", autoResultMap = true)
@ApiModel(value = "user_role_authority", description = "权限设置")
public class RoleAuthority extends AbstractEntity {
    /**
     * 角色id
     */
    @ApiModelProperty(value = "角色id", required = true, example = "这里是角色id")
    @NotNull(message = "请输入角色id")
    private Long role_id;

    /**
     * tag
     */
    @ApiModelProperty(value = "tag", required = true, example = "这里是tag")
    @NotBlank(message = "请输入tag")
    private String tag;

    /**
     * 数据等级
     * 1=所有数据
     * 2=自己的数据
     */
    @ApiModelProperty(value = "数据等级", required = true, example = "这里是数据等级")
    @NotNull(message = "请输入数据等级")
    private Integer data_level;

    /**
     * 访问等级
     * 1=可以访问
     * 2=禁止访问
     */
    @ApiModelProperty(value = "访问等级", required = true, example = "这里是访问等级")
    @NotNull(message = "请输入访问等级")
    private Integer access_level;


}
